package com.rd.student.jike.class4.wanghaixin.test0801;

import java.util.Arrays;

public class Test02 {
    public static void main(String[] args) {
        int[] arrays = {1,3,5,7,9,11,13,15,17};
        for (int i = 0,j=0; i < arrays.length - 1; i++) {
            if(arrays[i]==11){
                j=1;
            }
            if(j==1){
                arrays[i]=arrays[i+1];
            }
//            if(i+1==arrays.length-1){
//                arrays[i+1]=0;
//                break;
//            }
        }
        arrays[arrays.length-1]=0;
        System.out.println(Arrays.toString(arrays));

    }
}

